package com.lab.idea.smart;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.lab.idea.common.Response;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author mao
 */
@Slf4j
@RestController
@RequestMapping("/cpt")
public class CptController {

    @PostMapping("/save")
    public Response<JSONObject> save(@RequestBody String body) {
        log.info("收到数据：{}", body);
        return new Response<>(JSONUtil.parseObj(body));
    }
}
